package com.cskaoyan.model.vo.wxorder;

import lombok.Data;

/**
 * @program: project-market
 * @description: wxOrder
 * @author: shiyue
 * @create: 2021/12/2 15:38
 **/
@Data
public class HandleOption {//true则有对应的按钮,false则不给按钮,根据order_status判断
    private Boolean cancel;
    private Boolean delete;
    private Boolean pay;
    private Boolean comment;
    private Boolean confirm;
    private Boolean refund;
    private Boolean rebuy;
    private Boolean aftersale;

    public HandleOption() {

    }
    public HandleOption(int i) {
        cancel=false;
        delete=false;
        pay=false;
        comment=false;
        confirm=false;
        refund=false;
        rebuy=false;
        aftersale=false;

        if(i==101){
            this.setCancel(true);
            this.setPay(true);
        }else if(i==102){
            this.setDelete(true);
        }else if(i==103){
            this.setDelete(true);
        }else if(i==201){
            this.setRefund(true);
            this.setAftersale(true);
        }else if(i==202){
            System.out.println("");
        }else if(i==203){
            this.setRebuy(true);
            this.setDelete(true);
        }else if(i==301){
            this.setRefund(true);
            this.setAftersale(true);
            this.setConfirm(true);
        }else if(i==401){
            this.setRefund(true);
            this.setAftersale(true);
            this.setComment(true);
        }else if(i==402){
            this.setRefund(true);
            this.setAftersale(true);
            this.setConfirm(true);
            this.setComment(true);
        }
    }

    public Boolean getCancel() {
        return cancel;
    }

    public void setCancel(Boolean cancel) {
        this.cancel = cancel;
    }

    public Boolean getDelete() {
        return delete;
    }

    public void setDelete(Boolean delete) {
        this.delete = delete;
    }

    public Boolean getPay() {
        return pay;
    }

    public void setPay(Boolean pay) {
        this.pay = pay;
    }

    public Boolean getComment() {
        return comment;
    }

    public void setComment(Boolean comment) {
        this.comment = comment;
    }

    public Boolean getConfirm() {
        return confirm;
    }

    public void setConfirm(Boolean confirm) {
        this.confirm = confirm;
    }

    public Boolean getRefund() {
        return refund;
    }

    public void setRefund(Boolean refund) {
        this.refund = refund;
    }

    public Boolean getRebuy() {
        return rebuy;
    }

    public void setRebuy(Boolean rebuy) {
        this.rebuy = rebuy;
    }

    public Boolean getAftersale() {
        return aftersale;
    }

    public void setAftersale(Boolean aftersale) {
        this.aftersale = aftersale;
    }


}
